<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link rel="stylesheet" href="${ctx}/static/css/style.css" type="text/css" /> 
<script src="${ctx}/static/script/jquery-1.4.min.js" type="text/javascript"></script>

<script src="${ctx}/static/script/jquery-1.4.min.js" type="text/javascript"></script>
<script type="text/javascript" src="${ctx}/static/script/tree_panle.js" ></script> 

<style>
html{ height:100%;overflow: hidden; }
body{ height:100%; overflow: hidden;}
</style>
<script>
function openwin() { 
  var   w=screen.availWidth/2-246;   
  var   h=screen.availHeight/2-192;
window.open("width=492,height=292,left="+w+",top="+h+", scrollbars=no,");
} 
</script>
<script language="javascript">
$(function (){
		$(".left_home").find("li").bind("click",function(obj){
			var a = $(this).children()[0] ;
			var tabpanel = window.parent.frames[3].document.getElementById("ifmLeft").contentWindow.document.getElementById("tabpanel") ;
			var isContains = "" ;
			$(tabpanel).children().each(function(index,domElement){
				var index = $(domElement).html().lastIndexOf($(a).text().replace(/(^\s*)|(\s*$)/g,""))  ;
			if(index != -1){
					isContains = $(domElement) ;
					return true;
				}
			}) ;
			if(isContains){
				isContains.click() ;
				return ;
			}
			var id = new Date().getTime() ;
			
			$(tabpanel).append('<li id="' + id + '" onclick="changTab(\'' + $(a).attr("url") + '\',this)" class="right_Off"><div>' + $(a).text() + '&nbsp;&nbsp;<img onclick="closeTab(this)" src="${ctx}/static/images/close1.gif" /></div></li>');
			$(tabpanel).children(":last").click() ;
		}) ;
	}) ;
		function getBg(num){
		for(var id = 1;id<=12;id++)
		{
			if(id==num)
			{
				document.getElementById("mynav"+id).className="current";
			}
			else
			{
				document.getElementById("mynav"+id).className="";
			}
		}
	}
</script>

</head>

<body>
<div class="left_menu">
     	<dl id="panle">
     	<c:set   var= "index" value="0"/> 
	      <c:forEach items="${sessionScope.staff.staffFuns}" var="fun" varStatus="status">
	      <c:if test="${fun.function.parentFunctionId==0}">
		      <c:if test="${!status.first}">
		      </ul></div></dd>
		      </c:if>
	      <dt >${fun.function.name}</dt>
          <dd><div class="left_home"><ul></c:if>
          <c:if test="${fun.function.parentFunctionId!=0}">
          <c:set var="index" value="${index+1}"/>
          <li onclick="getBg(${index})" id="mynav${index}"  ><a href="#" url="${ctx}${fun.function.url}" > ${fun.function.name}</a></li>
          <li class="left_line"></li></c:if>
	      </c:forEach>
	        
	 <!--<script type="text/javascript">
	function dd_height(){
		var dd_list=document.getElementById("panle").getElementsByTagName("dd");
		for( var i=0;i<dd_list.length;i++){
		dd_list[i].style.height=document.documentElement.clientHeight-185+"px";

			}
			var h1h=dd_list[0].style.height;
			var h2h=dd_list[1].style.height;
			var h3h=dd_list[dd_list.length-1].style.height;

			if(parseInt(h1h) <=parseInt(h2h)){
				h1h=parseInt(h2h)+20;


				}

		}
</script>  -->
</body>
</html>
